Release 0.4.0

Incidentally, this fixes #52 .