Update extconf.rb to compile correctly on OS X

as per discussion in #672