fixed compiler bugs in examples/swe_simple.cpp

1.) #checkpoint is defined regardless of compiler options
2.) rewrote the check for the checkpoint file in a C++ way
3.) fixed the instantiation of the #NetCdfWriter