Fix modperl and modpython compilation.

Also fix few string-related inconsistences.

(cherry picked from commit 9fd4149d73e16473d0dbdbeb0fdc74545a215277)