make openDMD link library in dynamic or static, optionally