Compatibility for trunc(T, x) etc (Julia PR #9133)

CC @simonbyrne