Fixed LDFLAGS for prefix installation of libev.

Review: https://reviews.apache.org/r/24733