Update CGISession.pm

BugFixes Previous code was not working on more recent version of Dancer.