Allow Zepto to work with jQuery in noConflict mode

* Check that window.$ is undefined rather than whether $ is a property
 of window.
* jQuery in noConflict mode sets window.$ to undefined which was causing
  Zepto to not be assigned