Contact transformations and the quantisation of constraint systems