Use proper classloader when creating xml factories