Replace lists:droplast/1 with local alternative

lists:droplast/1 was added in 17.0