Remove some trailing whitespaces
Check if CustomEvent is defined rather than a function

Safari for Mac (6.0.5) and Safari for iOS (6.1) both return
"object" for "typeof CustomEvent". As such, Tap.js previously
defaulted to the deprecated document.createEvent mechanism
event though Safari supports the new API.
Merge pull request #6 from x3ro/x3ro/fix-safari-custom-event-check

Check if CustomEvent is defined, not if it is a function