(Merge 3.2) Fix curses module for strict SysV implementation (without has_key function)