Override getClassLoadingLock

This is to work around a problem in the implementation of
getClassLoadingLock in IBM Java.