Added fix for WP8 to lib.js