Conditionally check for require.cache to work properly with AMD loaders that don't provide this