Build fixes for OS X 10.9