Fix truncatechars and truncatewords.

They weren't behaving quite Django enough.
Fallback for Erlang < R16B.

Thanks @connorsml.