Fix session creation in systems without os.urandom