botan random limit template, add serializeToBuffer guard for os x