Work to get basic REPL to compile with MSVC

explicit casts and fix ifdefs (__WIN32__ => _WIN32)

remove unistd header already included in repl.h

add DLLEXPORT for consistency with repl.h

add -DLIBRARY_EXPORTS to FLAGS

use hex code for escape

put back getopt.h

define dirname and PATH_MAX for repl

fix LDFLAGS that MSVC doesn't understand

skip julia_res.o with msvc

extern C linkage on repl