Wrapped the setDeviceIdentifier method with a preprocessor macro

This change should have been included in PR #139 as discussed in issue #21.