gocr 0.50: Added option to build library

Using option '--with-lib' will run 'make libs' which will ensure the library and headers are installed. Required a minor patch to the makefile.

Closes #21997.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>