Adds correct VS flags for debugging. Fixes segfault