Fix a classloader issue during javafx resource loading