Updated to handle Safar versions that don't support window.performance.