Add a few missing terminal-related functions

This patch adds a few simple terminal-related libc functions that ncurses
requires (needed to run curses-based applications on OSv).

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>