Check that state variable is defined in isMatch()

Prevents an error from being thrown if ```ui-sref-active``` is inadvertently used without a corresponding ```ui-sref``` directive. See #1314.