Fix navigator detection for common.js