Make Angular promise from jQuery promise