Fixed NullPointerException with OpenJDK.

Please see https://github.com/gosu-lang/gosu-lang/issues/7 for details.

I am not sure if this is the correct way to fix this issue.