allow disabling automatic session restoration at compilation time