Generalize definition detection

Now allows more generalized forms. In the future, should also look for
X<infix,foo> or some such in the header.