add FreeBSD support

  fix compile error
  FreeBSD's VT switching support
  FreeBSD's install utility support