Don't cast away constness if not necessary.

Change-Id: I5f6ecd246e358edc3a2f4963c201b2435e4a1a42
Reviewed-on: https://code.wireshark.org/review/2910
Reviewed-by: Guy Harris <guy@alum.mit.edu>