Fix building on Android

 - Use $(AR) in makefiles
 - Include termios.h for struct winsize declaration