Fix a build issue on Mac OS X 10.9.2. Port to 0.6.

Also: remove an unused variable to silence a compiler warning.