Make helper class static

This helper class has no references to its containing class, so can be declared static
Make compatible with Apache commons codec 1.4

In pre-1.5 versions, this method will use 'chunking', causing invalid
HTTP. This adds trailing carriage return and line feed characters. This
patch tries to stay compatible with 1.4 as this version is provided with
multiple Java application servers, such as JBoss EAP 6(.1).