fix compiler/linker flags

restore dynamic export and coverage support.