[2.1] [Console] Added getTerminalDimensions() with fix for osx/freebsd