Added option to compile examples as static executables