fixed compilation problems on Mac OS X 10.7.5