Library.c multiplatform improvements