Fix OS X build by removing -Bstatic/dynamic

This introduces an ugly hack to the fairly pretty build system, but
hopefully operating system specific compiler hacks are rare.