Now using PHP session lifetime as default value for the JS config

This will fix the heartbeat when the session_lifetime config parameter
hasn't been set explicitly.

Backport of f9763e1fc5106320c7984eff14546f6815ee80d2