Check for availability of touch events

This one should fix issue #3.