compiler & linker flag fixes