Fix undefined var bug with touch gesture support.