Removed unused variable
Fixed problem with dynamic build on Windows