updated polyfill to use jquery plugin

fixes #257
Merge pull request #258 from ministryofjustice/fixes/gh-issue-257

updated polyfill to use jquery plugin