Implement ppx syntax extension

#63, rebased against master.