fix keepalive ifdefs