Ajax library with promises and XHR2 support