Compile/link fixes for the Mac target. Changed it to a static library.