forward -static and -shared flag to linker (like gcc does)