Allow `message` property to be a function which returns a string

Fixes #13