Fix non-jquery ajax call