C++11 fix: Add explicit static casts for cases where were relying on implicit conversion to a narrower/signed/unsigned integral type.

Issue: PLCR-538