export queryExtend as an AMD module when define && define.amd is present

As it's not at all expensive, I think it'd be nice to have the library export `queryExtend` as an AMD module in an AMD environment.