Add define option

As proposed in #29.