[BUGFIX] Adjust returnmail.phpshb for TYPO3 6.x

!!! Not yet tested, since I don't have a local
test-environment for it. Code based on init from:
typo3/cli_dispatch.phpsh

Change-Id: Ie633c14ae31397858a62fe9a778d790bd68b01ad
Releases: 3.1
Resolves: #49453
Reviewed-on: https://review.typo3.org/24605
Reviewed-by: Stefan Neufeind
Reviewed-by: Markus Schubath
Tested-by: Markus Schubath
Reviewed-by: Henrik Ziegenhain
Tested-by: Henrik Ziegenhain
Reviewed-by: Ivan Dharma Kartolo
Tested-by: Ivan Dharma Kartolo