Move gearlib detection to registry.js