encoding: silence gcc-4.8 overflow warnings.

Change-Id: I9a7e08b5c03a5811e846b9a545169e6d76e608ff
Refs: #1459
build: Fix boost and openssl detection scripts

Change-Id: I3a5ed9d589030454bde6e98ab2f1ad568e64adce