A bencode serializer for PHP 5.3+