Implemented solution as found in issue #13

I've implemented the solution for issue #13 as suggested by marques99 and confirmed that it's working: https://github.com/GetVideostream/cordova-chromecast/issues/13