Support building with JDK 1.6 and 1.7 on OSX

Fixes #2