Correctly detect crop region in Firefox