on php 5.3.3 encode the single quote properly to workaround php bug
example failed tests https://travis-ci.org/piwik/piwik/jobs/32095780