Fix OS X CALayer positioning and workaround Java 7 bug
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7172187