has_javascript compatibility with JSON::XS 3.01+

has_javascript { return $self->javascript == JSON::true; }

but we can't use == in JSON::XS 3.01 or JSON::PP (not overloaded properly)
should always eval to int (according to author)
Merge pull request #148 from brianhorakh/master

has_javascript compatibility with JSON::XS 3.01+