Fix onresponse hook handling of statuses as binary code

When you have custom status being returned it will be in binary format.
Therfore, counting the appropriate status will need to be done by
extracting statuts code from the status line.