Added support for CORS

Not tested yet, but Cross-origin requests should work now...