Fix jQuery #14142: Correctly handle numeric ids on Safari. Closes gh-219.