Use Automake conditionals for G313 build

Split G313 sources into POSIX and Windows versions and use Automake
conditionals for building on *linux-gnu or  mingw*, pw32*, or cygwin
platforms.

Fixed dlopen issue on g313 backend which broke rigmatrix generation.

Signed-off-by: Nate Bargmann <n0nb@n0nb.us>