OS X 10.6 build

This patch enables compiling on OS X 10.6