It looks like Safari 5.1 is relatively old, so it's possible that Google is automatically reverting to simpler behavior for compatibility purposes. Web functionality changes pretty frequently so a lot of sites use broad compatibility checks like this to guarantee things work well.

The simplest solution might just be to update your browser and/or use an alternative like Firefox or Chrome.