build fixes for mavericks

* include cbits/stubs.h first everywhere
* autoconf setup
* CPP macros to ensure we can parse the Mavericks headers
warnings