add support for openjdk-src builds with OpenJDK 8

I've tested this on Linux with both OpenJDK 7 and 8.  Other platforms
will probably require further changes.