Fixed the method use to check if promise is returned due to changes in angularjs 1.3.  This closes #101.