added preprocessor flags to toggle external libs