Fix -Wsign-compare warnings when inlined into C++

All 3 of these lines cause a -Wsign-compare warning in GCC when this is included from a C++ application (actually via option.h).

uint8_t bit shift is usually promoted to an integer, resulting in a size_t being compared to a signed integer.  By doing this cast we are guaranteed to never lose data (8 bits unsigned shifted becomes 5 bits unsigned, promotion and cast result in unsigned integer comparison), and it quiets the compiler.