Check for optreset in CMake as well.

Change-Id: I74aae1d68f48702b0cd1289cdafdfff8d817b5f4
Reviewed-on: https://code.wireshark.org/review/6068
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(cherry picked from commit 0a0ce2b78f4c537e7c667080cc00181884c97057)
Reviewed-on: https://code.wireshark.org/review/6069