Fix issue with getrandomvalues test and Safari 5 on OSX

* Safari 5 throws when doing an in check on window.crypto
* Cast to boolean as Safari 6 complains